package com.lemote.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 维修报告
 * @author wuhui
 * @time 2011-7-16 下午01:30:48
 * @Version:0.0.1
 * @since smt
 */
@Entity
@Table(name="smt_repairReport")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class RepairReport extends IdEntity {

	
	private CircuitBoard board;
	
	/**
	 * 描述
	 */
	private String description;
	
	/**
	 * 错误代码
	 */
	private String errorCode;
	
	/**
	 * 位置
	 */
	private String location;
	
	/**
	 * 处理
	 */
	private String process;
	
	/**
	 * 生成岗位
	 */
	private String jobName;
	
	/**
	 * 维修时间
	 */
	private Date repairDate;
	
	/**
	 * 维修人
	 */
	private User repairer;
	
	/**
	 * 分析师
	 */
	private User analyzer;
	
	/**
	 * 结果 -0:良品  2：报废
	 */
	private String result;
	
	/**
	 * 0:未分析，1:分析完成
	 */
	private Integer status;
	
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@ManyToOne
	@JoinColumn(name="boardId")
	public CircuitBoard getBoard() {
		return board;
	}

	public String getDescription() {
		return description;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public String getLocation() {
		return location;
	}

	public String getProcess() {
		return process;
	}


	public Date getRepairDate() {
		return repairDate;
	}

	@ManyToOne
	@JoinColumn(name="userid")
	public User getRepairer() {
		return repairer;
	}

	@ManyToOne
	@JoinColumn(name="analyzer")
	public User getAnalyzer() {
		return analyzer;
	}

	public void setAnalyzer(User analyzer) {
		this.analyzer = analyzer;
	}

	public void setBoard(CircuitBoard board) {
		this.board = board;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public void setProcess(String process) {
		this.process = process;
	}


	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public void setRepairDate(Date repairDate) {
		this.repairDate = repairDate;
	}

	public void setRepairer(User repairer) {
		this.repairer = repairer;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}


}
